package com.fwmagic.flink.streaming;

import org.apache.flink.api.common.functions.FlatMapFunction;
import org.apache.flink.api.common.functions.MapFunction;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.util.Collector;

public class TestStreaming {
    public static void main(String[] args) throws Exception{
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.getConfig().enableForceAvro();
        DataStreamSource<String> dataSource = env.fromElements("a", "b", "c");


        DataStream<String> dataStream = dataSource.map(new MapFunction<String, String>() {
            @Override
            public String map(String value) throws Exception {
                return value;
            }
        });
        dataStream.print().setParallelism(1);
        env.execute("test");

    }
}

class MyFlatMapFunction<T,O> implements FlatMapFunction<T,O> {


    @Override
    public void flatMap(T value, Collector<O> out) throws Exception {
        //out.collect("");
    }
}
